﻿//===============================================================================
//	CNoticeCommon
//	通用通知
//===============================================================================

#include "CNoticeCommon.h"


//-------------------------------------------------------------------------------
CNoticeCommon::CNoticeCommon(uint32_t uid, uint32_t pn)
	: BaseMessage(uid, pn)
{
	_safe_guard_begin;
	_safe_guard_end;
}

//-------------------------------------------------------------------------------
CNoticeCommon::~CNoticeCommon(void)
{

}

//-------------------------------------------------------------------------------
void CNoticeCommon::SetNoticeCommonData(NoticeCommon& noticeData)
{
	_safe_guard_begin;

	if (noticeData.GetOption1())
	{
		m_jv["user1"] = noticeData.GetOption1()->c_str();
	}

	if (noticeData.GetOption2())
	{
		m_jv["user2"] = noticeData.GetOption2()->c_str();
	}

	if (noticeData.GetOption3())
	{
		m_jv["user3"] = noticeData.GetOption3()->c_str();
	}

	m_jv["opt1"] = noticeData.GetUserVal1();
	m_jv["opt2"] = noticeData.GetUserVal2();
	m_jv["opt3"] = noticeData.GetUserVal3();

	m_jv["ret"] = 0;

	_safe_guard_end;
}
